Similar to what Gtk does, now toggling with Space does not close
the menu.
https://bugzilla.gnome.org/show_bug.cgi?id=664416
this.toggle();
}
+ // we allow pressing space to toggle the switch
+ // without closing the menu
+ if (event.type() == Clutter.EventType.KEY_PRESS &&
+ event.get_key_symbol() == Clutter.KEY_space)
+ return;
+
this.parent(event);
},
this._statusChooser = item;
item = new PopupMenu.PopupSwitchMenuItem(_("Notifications"));
- item.connect('activate', Lang.bind(this, this._updatePresenceStatus));
+ item.connect('toggled', Lang.bind(this, this._updatePresenceStatus));
this.menu.addMenuItem(item);
this._notificationsSwitch = item;